package javaThread;

public class Thread2 implements Runnable {
	private int count = 15;

	/*
	 * public Thread2(String name) { this.name = name; }
	 */

	@Override
	public void run() {
		for (int i = 0; i < 15; i++) {
			if(count<0) break;
			System.out.println(Thread.currentThread().getName() + "运行  count= "
					+ count--);
			try {
				Thread.sleep((int) Math.random() * 10);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}

}
